<?php

/**
 * This is the model metadata class for table "authority".
 */
class AuthorityMetadata extends CARMDC
{
	/**
	 * @return string the associated database table name
	 */
	public function tableName()
	{
		return 'authority';
	}

	/**
	 * @return array validation rules for model attributes.
	 */
	public function rules()
	{
		// NOTE: you should only define rules for those attributes that
		// will receive user inputs.
		return array(
			array('authority_type, authority_status', 'numerical', 'integerOnly'=>true),
			array('authority_name', 'length', 'max'=>64),
			array('authority_url, description', 'length', 'max'=>255),
			array('parent_id', 'length', 'max'=>20),
			// The following rule is used by search().
			// Please remove those attributes that should not be searched.
			array('authority_id, authority_name, authority_type, authority_status, authority_url, parent_id, description', 'safe', 'on'=>'search'),
		);
	}

	/**
	 * @return array relational rules.
	 */
	public function relations()
	{
		// NOTE: you may need to adjust the relation name and the related
		// class name for the relations automatically generated below.
		return array(
		);
	}

	/**
	 * @return array customized attribute labels (name=>label)
	 */
	public function attributeLabels()
	{
		return array(
			'authority_id' => '资源Id, 主键, 自增长',
			'authority_name' => 'Authority Name',
			'authority_type' => 'Authority Type',
			'authority_status' => 'Authority Status',
			'authority_url' => 'Authority Url',
			'parent_id' => 'Parent',
			'description' => 'Description',
		);
	}
}